﻿@model Guan.CMS.Web.ViewModels.UserFormModel

@{
    ViewBag.Title = "注册";
}

<h2>新建账号</h2>
<p>
    密码不少于6位。
</p>

@using (Html.BeginForm((string)ViewBag.FormAction, "Account")) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true, "创建账号失败，请改正下列错误并重试。")
    <div>
        <fieldset>
            <legend>账号信息</legend>
            
            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Name)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Name)
                @Html.ValidationMessageFor(m => m.Name)
            </div> 
            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <p>
                <input type="submit" value="注册" />
            </p>
        </fieldset>
    </div>
}
@section Scripts
{
    @Scripts.Render("~/bundles/jqueryval")
}
